import request from "@/api/request"

import { permissionsApiUris } from "./apis"
import type { CommonRes } from '@/api/user/types.ts'
import type { AxiosResponse } from 'axios'




export const permissionsApi = {
    listPermissions(params: any) {
      return request({
        url: permissionsApiUris.ListPermissions,
        method: 'post',
        data: params,
      })
    },
    getPermissions(params: any) {
      return request({
        url: permissionsApiUris.GetPermissions,
        method: 'post',
        data: params,
      })
    },
    addPermissions(params: any) {
      return request({
        url: permissionsApiUris.AddPermissions,
        method: 'post',
        data: params,
      })
    },
    updatePermissions(params: any) {
      return request({
        url: permissionsApiUris.UpdatePermissions,
        method: 'post',
        data: params,
      })
    },
  deletePermissions(params: any): Promise<AxiosResponse<CommonRes<boolean>>> {
      return request({
        url: permissionsApiUris.DeletePermissions,
        method: 'post',
        data: params,
      })
  }
}
